package com.dwxt.cdms.view.wristwatch;

import com.dwxt.cdms.util.DictUtil;
import lombok.Data;

/**
 * 客户基本数据
 *
 * @author Kuang.JiaZhuo
 * @date 2020-09-10 17:21
 */
@Data
public class CustomerBasic {

    /**
     * 档案编号
     */
    private String fileNumber;

    /**
     * 电话
     */
    private String phone;

    /**
     * 客户id
     */
    private Integer customerId;

    /**
     * 姓名
     */
    private String name;

    /**
     * 客户类型
     */
    private Integer customerType;

    //客户类型Display
    public String getCustomerTypeDisplay(){
        return customerType==null?null: DictUtil.getDisplay("customerType",customerType.toString());
    }

    /**
     * 老人类型
     */
    private String theOldType;

    //老人类型Display
    public String getTheOldTypeDisplay(){
       if(null==theOldType){
           return null;
       }else{
           String[] split = theOldType.split(",");
           String result = "";
           for(String value:split){
               result += DictUtil.getDisplay("theOldType",value) + ",";
           }
           result = result.substring(0,result.length() - 1);
           return result;
       }
    }

    /**
     * 服务类型
     */
    private Integer serviceType;

    public String getServiceTypeDisplay(){
        return serviceType==null?null: DictUtil.getDisplay("serviceType",serviceType.toString());
    }

}
